<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
    <title>华迅直购</title>
    <link rel="stylesheet" type="text/css" href="css/app.css"/>
    <link rel="stylesheet" type="text/css" href="css/root.css"/>
    <link rel="stylesheet" type="text/css" href="css/entrance/home.css"/>
    <script type="text/javascript" src="js/base/jquery-3.1.1.min.js?ver=2.0.3" charset="utf-8"></script>
    <script type="text/javascript" src="js/base/underscore-min.js"></script>
    <script src="js/base/api.js?ver=2.0.4"></script>
    <script src="js/base/base.js"></script>
    <script src="js/base/vue-filter.js"></script>
    <script src="js/base/vue.js"></script>
    <script src="js/base/swipe.min.js"></script>
    <script src="js/base/phone.js"></script>

    <script src="js/iconfont.js"></script>
    <script>
        var haserr = 0;
        var errmsg = '';
        var dnurl = '';
        var telfront = '';
    </script>

    <script type="text/javascript" src="js/base/magiclamp.js?ver=2.0.3" charset="utf-8"></script>
    <script type="text/javascript" src="js/entrance/home_self_service.js?ver=2.0.7" charset="utf-8"></script>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>

</head>
<body>


<div id="goodsapp">
    <div v-if="show_share_bar" style="position: fixed; z-index: 10000; top: 0px; bottom: 0px;left: 0px;right: 0px; background: rgba(0,0,0,.3)">
        <div style="display: flex; flex-direction: column;margin: auto; margin-top: 15rem; background: #ffffff;border-radius:1rem; width: 30rem; ">
            <div style="width: 90%;margin: auto;height: 5rem; padding: 1.5rem; border-bottom: #d9d7d7 1px solid;text-align: center;font-size: 1.5rem;">
                <b>一起买, 一起减</b> <img src="img2/hong_jian_tou.png" style="width: 2rem;float: right;">
            </div>
            <div style="width: 90%;margin:auto;padding: 2rem 0 0 0;">
                点击右上角菜单转发或者分享给你的朋友，
                参加"一起买， 一起减"活动。您的朋友可以立减<span style='color: red;font-weight: bold'>{{price_filter(goods_info.x_price)}}元</span>，
                每找到一个朋友一起买,您可以再减<span style='color: red;font-weight: bold'>{{price_filter(goods_info.y_price)}}元</span>，商品
                最低价格可以减到<span style='color: red;font-weight: bold'>{{price_filter(goods_info.m_price)}}元</span>.
            </div>
            <div style="width: 90%;margin:auto;padding: 0.2rem 0;color: #1E88C7;font-size: 1.2rem;" v-if="together_goods_info.visit_list">
                <img src="img2/yijingmai.png" style="width: 1.3rem;"> 愿意一起买，但还没有买单:
            </div>
            <div style="width: 90%;margin:auto;padding: 0.2rem 0;font-size: 1.2rem;" v-if="together_goods_info.visit_list">
                <span >{{together_goods_info.visit_list}}</span>
            </div>
            <div style="width: 90%;margin:auto;padding: 0.2rem 0;color: #1E88C7;font-size: 1.2rem;" v-if="together_goods_info.buy_list">
                <img src="img2/yijingmai.png" style="width: 1.3rem;"> 已经购买:
            </div>
            <div style="width: 90%;margin:auto;padding: 0.2rem 0;font-size: 1.2rem;" v-if="together_goods_info.buy_list">
                <span >{{together_goods_info.buy_list}}</span>
            </div>
            <div style="display: flex;flex-direction: column;border-top: #d9d7d7 1px solid;">

                <div style="padding: 1rem;margin:auto;font-size: 2rem;color: #063e78;" @click="show_share_bar=false;">
                    我知道了
                </div>
            </div>

        </div>
    </div>
    <header>

        <h1 class="h-title">
            <img src="img2/public_icon_fanli.png" class="img-icon">
            {{goods_info.name}}
        </h1>

        <a @click="show_share_bar=true;" target="" data-href="" class="h-right">
            <img src="img2/fenxiang2.png" style="width: 4rem;height: 1.2rem;" class="img-icon">
        </a>
    </header>
    <div id="root" class="h-a-bar">

        <a href="#" id="naked-notice">
            <!--<i class="iconfont icon-kaijiang"></i> 召唤前台送货上门-->
            <!--<i class="iconfont icon-arrow1"></i>-->
        </a>
        <!--商品详情大图-->

        <div id="jiaodiantu" v-show="!show_video_div">
            <div class='swipe-wrap2'>
                <div v-for="img in goods_info.files_json" v-if="goods_info.files_json.length>0"><img
                        :src="img.url+'&imageView2/0/w/375/h/375'"/></div>
                <div v-if="goods_info.files_json.length==0"><img
                        :src="baseConfig.qn_host+goods_info.small_image__fileurl+'?imageView2/0/w/375/h/375'"></div>
            </div>
            <ul class="xiaoyuandian">
                <li v-for="img in goods_info.files_json"></li>
            </ul>
            <div class="pro-play-label" v-show="goods_info.video_id" @click="go_show_video_div">
                更多
            </div>
        </div>
        <div v-show="show_video_div" class="goodslist-video">
            <div class="goods-video">
                <video id="goods_video" style="width:100%;" x-webkit-airplay="true" preload="auto"
                       x5-video-player-type="h5" webkit-playsinline="true" @pause="pause_video"
                       controls
                       playsinline
                       :src="baseConfig.qn_host + goods_info.video__fileurl" v-if="!show_video_img">
                </video>
                <div class="label_img" v-if="show_video_img" style="height: 20rem;">
                    <img :src="baseConfig.qn_host+goods_info.small_image__fileurl+'?imageView2/0/w/375/h/375'"
                         @click="show_video" class="pro-play-img">
                    <svg class="pro-play" @click="show_video">
                        <use xlink:href="#icon-play"></use>
                    </svg>
                </div>
                <div class="pro-play-label" v-if="show_video_img" @click="go_show_video_div">
                    更多
                </div>
            </div>
        </div>
        <!--商品详情页面名称及价格和提示-->
        <div class="g-info">
            <p class="g-name">
                <i class="goods-mark mark-sd" v-text="goods_info.goodstype__name"></i>
                <!--                <i class="goods-mark mark-dn">前台送货</i>-->
                <span class="name" v-text="goods_info.name"></span>
            </p>
            <div class="g-gg" >

                <span class="name" style="margin-left: 1rem;width: 50%;overflow: hidden;">规格:{{goods_info.gg}}</span>
                <div  class="g-gg" style="text-align: right;float: right;">
                    <img src="img/tuijian.png" style="width: 2rem;" @click="tuijian(goods_info)">
                </div>
            </div>

            <p class="g-gg">
                <span class="goods-price" style="font-size: 1.7rem;text-decoration:line-through;" v-if="together_goods_info.has_huodong"
                      v-text="price_filter(goods_info.price-goods_info.bu_tie_price)">
                </span>
                <span class="goods-price" style="font-size: 1.7rem;"  v-if="!together_goods_info.has_huodong"
                      v-text="price_filter(goods_info.price-goods_info.bu_tie_price)">
                </span>

                <span class="name" style="margin-left: 1rem;font-size: 1.2rem" v-if="is_send">发往{{send_address}}</span>
                <span class="name" style="margin-left: 0.2rem;font-size: 1.2rem" v-if="is_send">运费:</span>
                <span class="name" style="margin-left: 0.4rem;font-size: 1.2rem" v-if="is_send&&send_price>0"
                      v-text="price_filter(send_price, 0)+'元'">
                </span>
                <span class="name" style="margin-left: 0.4rem;font-size: 1.2rem" v-if="is_send&&send_price==0">
                    包邮
                </span>

            </p>
            <div style="color: #F5A623;font-size: 1.5rem;" @click="show_zonghe_pingjia(goods_info)">
                <span style="color: #F5A623;font-size: 1.2rem;">综合评价:</span>
                <img v-for="img in start_list"
                     :src="img.index<=goods_info.ping_jia+0.5?'img2/star_big_light.png':'img2/star.png'"
                     style="width: 1.2rem;">
                <img src="img2/shenglv.png"  style="width: 1.2rem;"/>

            </div>


        </div>
        <div class="g-huodong" v-if="goods_info.is_together">
            <div class="pink" v-if="together_goods_info.has_huodong&&(goods_info.price-goods_info.bu_tie_price-together_goods_info.visit_price-together_goods_info.buy_price-together_goods_info.share_user_price)>goods_info.m_price" @click="show_share_bar=true;" >
                现价{{price_filter(goods_info.price-goods_info.bu_tie_price-together_goods_info.visit_price-together_goods_info.buy_price-together_goods_info.share_user_price)}}元 · 一共减{{price_filter(together_goods_info.visit_price+together_goods_info.buy_price+together_goods_info.share_user_price)}}元。
            </div>
            <div class="pink" v-if="together_goods_info.has_huodong&&(goods_info.price-goods_info.bu_tie_price-together_goods_info.visit_price-together_goods_info.buy_price-together_goods_info.share_user_price)<goods_info.m_price" @click="show_share_bar=true;" >
                现价{{price_filter(goods_info.m_price)}}元,已减到最低价。
            </div>
            <div class="msg" v-if="together_goods_info.share_user_name">
                <span style='color: red;font-weight: bold'>{{together_goods_info.share_user_name}}</span>分享给您，立减<span style='color: red;font-weight: bold'>{{price_filter(together_goods_info.share_user_price)}}</span>元。
            </div>
            <div class="msg" v-if="together_goods_info.visit_num>0">
                有<span style='color: red;font-weight: bold'>{{together_goods_info.visit_num}}人</span>愿意和您一起购买，再减<span style='color: red;font-weight: bold'>{{price_filter(together_goods_info.visit_price)}}</span>元。
            </div>
            <div class="msg" v-if="together_goods_info.buy_num>0">
                有<span style='color: red;font-weight: bold'>{{together_goods_info.buy_num}}人</span>和您一起购买了，再减<span style='color: red;font-weight: bold'>{{price_filter(together_goods_info.buy_price)}}</span>元。
            </div>
            <div class="line" v-if="together_goods_info.has_huodong"></div>
            <div class="green" @click="show_share_bar=true;" >
                <img src="img2/huodong.png" style="width: 2rem;">
                "一起买，一起减"活动
                <img src="img2/you.png" style="height: 1.5rem;margin-top: 0.5rem;float: right;">
            </div>
            <div class="msg" v-if="goods_info.is_together">
                还可以再减，最低能减到<span style='color: red;font-weight: bold'>{{price_filter(goods_info.m_price)}}</span>元。
            </div>
            <div class="line"></div>

        </div>
        <!--调整数量-->
        <div class="g-reg-count">
            <span class="count-txt">购买数量(剩:{{goods_info.num-goods_info.sale_num}})</span>
            <span class="reg-count"><span class="count-minus" data-min="1" data-msg="不能再少了"><i
                    class="iconfont icon-jian"></i></span>
            <span class="count-sum" id="count-sum">1</span>
            <span class="count-plus" :data-max="goods_info.num-goods_info.sale_num"
                  data-msg="已达到最大库存量"><i class="iconfont icon-jia"></i></span>

            </span>

        </div>
        <pre class="goods-notice" v-text="goods_info.desc"></pre>
        <img :src="item.url" width="100%" v-for="item in goods_info.desc_files_json">
        <div style="margin-left: auto;margin-right: auto;margin-top: 1rem;">
            <img src="img2/tuijian.png" style="width: 50%;margin-left: 25%;margin-top: 0.5rem;margin-bottom: 0.5rem;">
        </div>
        <div class="cart-list" v-for="goods in goods_list" @click="go_goods_detail(goods.id)">
            <img class="goods-img"
                 :src="baseConfig.qn_host + goods.small_image__fileurl+'?imageView2/1/w/240/h/240'">
            <div class="goods-main">
                <div class="name">{{goods.name}}</div>
                <div class=" margin-bottom"></div>
                <div class="goods-id">商品id:{{goods.id}}</div>
                <div class="bottom">
                    <div class="price">{{price_filter(goods.price-goods.bu_tie_price)}}</div>
                    <div class="goods-num">已售:{{goods.sale_num}}</div>
                </div>
            </div>
        </div>
        <div class="action-bar">

            <a class="ac-left" href="home.html">

                <div style="display: flex;flex-direction:column;align-items:center;padding: 0.5rem">
                    <img src="img2/home.png" style="width: 2rem;height: 2rem">
                    <span style="line-height: 1.2rem;height: 1.2rem;font-size: 1rem;">首页</span>
                </div>

            </a>
            <a class="ac-left" @click="go_goodsstroe" v-if="baseConfig.is_phone">

                <div style="display: flex;flex-direction:column;align-items:center;padding: 0.5rem">
                    <img src="img2/dianpu.png" style="width: 2rem;height: 2rem">
                    <span style="line-height: 1.2rem;height: 1.2rem;font-size: 1rem;">店铺</span>
                </div>

            </a>
            <a class="ac-left" @click="open_cart">
                <i class="cart-pop" id="cartnum" v-if="cart_num" v-text="cart_num">
                </i>
                <div style="display: flex;flex-direction:column;align-items:center;padding: 0.5rem">
                    <img src="img2/gouwuche.png" style="width: 2rem;height: 2rem">
                    <span style="line-height: 1.2rem;height: 1.2rem;font-size: 1rem;">购物车</span>
                </div>

            </a>
            <a class="ac-mid jus" id="addcart" @click="add_cart($event)">
                加入购物车
            </a>
            <a class="ac-right" @click="quick_create_order"
               id='buy_now'>立即购买</a>

        </div>
        <a class="chat_btn" @click="chat_to_host()"><img src="img2/btn_lt_highlight.png"></a>
    </div>
    <input type="hidden" id="activity" value="0"/>
    <input type="hidden" id="activity-act_img" value=""/>
    <input type="hidden" id="activity-act_title" value=""/>
    <input type="hidden" id="activity-act_desc" value=""/>
    <input type="hidden" id="activity-id" value=""/>
    <input v-model="selected_img" type="hidden">
    <!--<div id="tab-bar">-->
    <!--<a href="/961368.html" class="self_service">-->
    <!--<i class="iconfont icon-erweima"></i>-->
    <!--<span>扫购</span>-->
    <!--</a>-->
    <!--<a href="/discovery/index.html" class="discovery">-->
    <!--<i class="iconfont icon-faxian"></i>-->
    <!--<span>发现</span>-->
    <!--</a>-->
    <!--<a href="/lucky/main/lucky.html" class="lucky">-->
    <!--<i class="iconfont icon-fukuan"></i>-->
    <!--<span>替你付款</span>-->
    <!--</a>-->
    <!--<a href="/account/user/user_center.html" class="user_center">-->
    <!--<i class="iconfont icon-user"></i>-->
    <!--<span>我的</span>-->
    <!--</a>-->
    <!--</div>-->
</div>
</body>

</html>